#ifndef WIDGET_H
#define WIDGET_H

#define BOARD_WIDTH 640
#define BOARD_HEIGHT 640
#define WIDGET_WIDTH 800
#define WIDGET_HEIGHT 915
#define GL 80

#include "piece.h"
#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QMenuBar>
#include <QMenu>
#include <QLayout>
#include <QPainter>
#include <QPaintEvent>
#include <QEvent>
#include <QTimer>
#include <vector>
#include <memory>
#include <QDebug>

using std::vector;
using std::shared_ptr;

class Widget : public QWidget
{
    Q_OBJECT

private:
    //member variables, record some states of game
    vector<shared_ptr<Piece>> pieces;
    bool check = false;
    bool checkmate = false;

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    void paintEvent(QPaintEvent *event) override;
};
#endif // WIDGET_H
